<?
require("config.php");

$location_status .= " | Delete";

$show_backnav = "type_menu";

$menuname = NULL;

$menutarget = NULL;

if (NULL!=$action){
   $table = "pro_type";

   $Query = "delete from $table where id = $id Limit 1";
   myQuery($Query);

   header("location:" . $rela_path . "share/msg.php?v=9");

   exit;

}

if (!checkRecord($table,$id)){

	header("location:" . $rela_path . "share/msg.php?v=9002");
  
  }

$Query = "select * from pro_type where id = $id";
$r = myQuery($Query);

if (!$r) header("location:" . $rela_path . "share/msg.php?v=9002");
$Code = $r[0][1];
$Name = $r[0][2];

require($rela_path . "inc/header.php");

?> 

<form action="" method="post" name="form1">
<table width="95%" border="0" align="center">
  <tr> 
    <td align="right">&nbsp; </td>
  </tr>
  <tr> 
    <td><p>Are you sure to delete this Type ? 
        <input type="Submit" class="button" name="Submit33" value="  Yes  " onClick="Redirect('../../share/msg.php?v=9',1)">
        <input type="button" class="button" name="Submit32" value="  No  " onClick="Redirect('type_menu.php',1);">
        <input name="action" type="hidden" value="delete">
        <input name="id" type="hidden" value="<?print($id)?>">
        <br>
        <br>
      </p>
      <table>
        <tr>
          <td class="tdheader">Code :</td>
          <td><?print($Code)?></td>
        </tr>
        <tr>
          <td class="tdheader">Name : </td>
          <td><?print($Name)?></td>
        </tr>
      </table>
      <p><br>
        <br>
      </p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp; </p></td>
  </tr>
</table>
<?
require($rela_path . "inc/footer.php");
?>
